The present invention relates generally to management of memory resources, and more specifically, to the defragmentation of a storage class memory managed in extents.
A computing environment may include main memory, as well as auxiliary storage, such as direct access storage devices (DASD) or flash memory. Main memory includes pages of memory that are backed by real storage, referred to as real storage frames. These pages are ready to be accessed by applications, instructions, operations, or other entities. Main memory is limited in space, and therefore typically only the most recently used pages of memory are maintained in main memory. The other pages of memory are maintained in auxiliary storage.
Auxiliary storage may include blocks of storage that are read and written. These blocks of storage are managed by an auxiliary storage manager, including the allocation/deallocation of the blocks. In one example, the auxiliary storage manager tracks which blocks are currently being used and by what system components. To facilitate managing the blocks of storage, a portion of the auxiliary storage, such as the storage class memory, may be separated into extents, where an extent is a range of storage. The extents may be configured to be used with a single size block of storage or for a mix of multiple sizes of blocks of storage. For instance, one extent may be configured for storing 4 kilobyte blocks, another extent may be configured for storing 1 megabyte blocks and another extent may be configured to store both sizes of blocks.
While using extents to manage blocks of storage class memory has advantages, the use of extents can lead to the storage class memory becoming fragmented and inefficient use of the auxiliary storage space. Fragmentation can necessitate demotion of 1M blocks in to 4K blocks which can lead to system performance degradation.